from django.conf.urls.defaults import *

urlpatterns = patterns('',
    # Example:
    # (r'^tweedledo/', include('tweedledo.foo.urls')),

	(r'^$', 'todo.views.index'),
	(r'^refresh_working_on/$', 'todo.views.refresh_working_on'),
	(r'^refresh_paused_tasks/$', 'todo.views.refresh_paused_tasks'),
	(r'^create_paused_task/$', 'todo.views.create_paused_task'),
	(r'^start_paused_task/(?P<task_id>\d+)/$', 'todo.views.start_paused_task'),
	(r'^pause_task/(?P<task_id>\d+)/(?P<task_ordinal>\d+)/$', 'todo.views.pause_task'),    
    (r'^complete_task/(?P<task_id>\d+)/$', 'todo.views.complete_task'),

    # Person related
    (r'^people/$', 'todo.views.people'),
    (r'^create_person/$', 'todo.views.create_person'),
    
    # API  
    (r'^api/ensure_user/$', 'api.views.ensure_user'), 
    (r'^api/get_tasks/(?P<person_container_id>\d+)/$', 'api.views.get_tasks'),
    (r'^api/add_task/$', 'api.views.add_task'),
    (r'^api/add_task_get/$', 'api.views.add_task_get'),    
    (r'^api/start_task/$', 'api.views.start_task'),
    (r'^api/start_task_get/$', 'api.views.start_task_get'),
    (r'^api/pause_task/$', 'api.views.pause_task'),
    (r'^api/pause_task_get/$', 'api.views.pause_task_get'),
    (r'^api/assign_task/$', 'api.views.assign_task'),
    (r'^api/assign_task_get/$', 'api.views.assign_task_get'),
    (r'^api/complete_task/$', 'api.views.complete_task'),
    (r'^api/complete_task_get/$', 'api.views.complete_task_get')
)
